package com.seeqool.v1;

import java.awt.Component;
import java.awt.Container;

import javax.swing.Box;
import javax.swing.JFrame;

import org.jfree.chart.ChartPanel;
import org.jfree.chart.JFreeChart;
import org.jfree.chart.plot.Plot;

public class ChartFrame extends JFrame {
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	
	private Box form;

	public ChartFrame(String title, Plot plot) {
		super(title);
		ChartPanel chart = new ChartPanel(new JFreeChart(plot));
		Container c = getContentPane();
		form = Box.createVerticalBox();
		form.add(chart);
		setLocationByPlatform(true);
		c.add(form);
	}
	
	public void addItem(Component comp) {
		form.add(comp);
	}
}
